1. Field of the Invention
The present invention relates generally to a multiprocessor data processing system. In particular, the present invention relates to improving thread posting efficiency in a multiprocessor data processing system. Still more particularly, the present invention relates to improving thread posting efficiency in a multiprocessor data processing system by awaking client threads based on a given central processing unit on which the client threads are expected to run.
2. Description of the Related Art
The UNIX operating system is a multi-user operating system supporting a hierarchical directory structure for the organization and maintenance of files. In contrast with a single operating system, UNIX is a class of similar operating systems. Dozens of different implementations of UNIX are present, such as Advanced Interactive eXecutive (AIX), a version of UNIX produced by International Business Machines Corporation. Each implementation is similar to use because each of these implementations provides a core set of basic UNIX commands.
The UNIX operating system is organized at three levels: the kernel, shell, and utilities. The kernel is the software that manages a user program's access to the system hardware and software resources, such as scheduling tasks, managing data/file access and storage, and enforcing security mechanisms. The shell presents each user with a prompt, interprets commands typed by a user, executes user commands, and supports a custom environment for each user. The utilities provide tools and applications that offer additional functionality to the operating system.
In the AIX operating system, users may put one or more threads to sleep by invoking a thread_wait command in the user mode and subsequently waking up each thread by invoking a thread_post user command. For large transaction centric applications that comprise thousands of threads, such as DB2 Universal Database and Oracle, thread posting efficiency becomes an issue. DB2 Universal Database is a product available from International Business Machines Corporation, and Oracle is a product available from Oracle Corporation.
In particular, these applications perform database logging on a single central processing unit (CPU) or a processor of a multiprocessor data processing system. However, if the multiprocessor data processing system has 128 processors all generating logging requests, database logging becomes a bottleneck since only one or a small number of processors is used as a logger. To alleviate this problem, improvements have been made that reduce database logging overhead by allowing the logger task to wake up all of its client threads in a single system call. This system call is known as thread_post_many.
Thread_post_many system call wakes up all of its client threads by issuing the equivalent of a thread_post system call to individual threads in a loop. However, thread_post_many system call only solves part of the problem. Each update that threads running on various of the 128 processors try to perform requires a logging. In addition, only one processor may be used as a logger. Therefore, a relatively large number of threads have to wait until the single logging thread completes previous logging. Although each wait only costs a few milliseconds, the total waiting time becomes a problem when there are 127 processors generating logging requests but only 1 processor handling them. Greater efficiency improvement is needed for the large number of computing threads that result from the increasing number of logging requests.